package com.jin.action;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.jin.entity.impl.User;
import com.jin.service.impl.UserService;
import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
@Controller("userAction")
@Scope("prototype")
public class UserAction extends ActionSupport{
  @Resource
  UserService userService;
  User user;
  
  
  public String add(){
	  
		  if(userService.addUser(user)){
			  return SUCCESS;
		  }
     	  return INPUT ;
  }

public UserService getUserService() {
	return userService;
}

public void setUserService(UserService userService) {
	this.userService = userService;
}

public User getUser() {
	return user;
}

public void setUser(User user) {
	this.user = user;
}
  
}
